import { Injectable } from '@nestjs/common';

@Injectable()
export class UserService {

    getAllUsers(query: any) {
        return query + 'All users';
    }

    createUser(body) {
        return {
            id: 1,
            name: body.name,
            msg: '创建成功'
        }
    }

    updateUser(body) {
        return {
            id: 1,
            name: body.name,
            msg: '更新成功'
        }
    }

    getUser(id: number) {
        return `User with id ${id}`;
    }

}
